<template>
<div>
    <div v-if="data.length != 0">
        <div  :data=data v-for="(item,key) in data" :key=key>
            <el-submenu v-if="item.childrens.length != 0" :index=item.id>
                <template slot="title"><i class="el-icon-message"></i>{{item.name}}</template>
                <myMenu :data=item.childrens />
            </el-submenu>
            <el-menu-item v-else :index='"/home"+item.path'>{{item.name}}</el-menu-item>  
        </div>
    </div>
</div>
</template>

<script>

export default {
    name:"myMenu",
    props:['data'],
    data() {
      return {
          
      };
    },
    methods: {
        
    }
}
</script>

<style>
body {
  margin: 0px;
  padding: 0;
}
</style>